import { observable, action } from 'mobx';
import http from '../common/http';
// import paramInspect from '../common/paramInspect';

class SetStore {
  constructor(rootStore) {
    this.rootStore = rootStore
  }

  @observable missionParam = {
    "status": 0
  }

  @observable missionList = [];

  @action toGetAssignList = () => {
    this.rootStore.globalStore.toShowLoding();
    http.get('/article/listForAssign', this.missionParam)
    .then((response) => {
      this.rootStore.globalStore.toHideLoading();
      if (response.success) {
        this.missionList = response.data
      }
    })
  }

  @observable contributeParam = {
    "status": 0,
    "type": 2
  }

  @action toGetAssignContributeList = () => {
    this.rootStore.globalStore.toShowLoding();
    http.get('/contributeBoss/listForAssign', this.contributeParam)
    .then((response) => {
      this.rootStore.globalStore.toHideLoading();
      if (response.success) {
        this.missionList = response.data
      }
    })
  }

}


export default SetStore;
